package com.hsjk.szwj.module.pay.service;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.hsjk.szwj.module.pay.dal.dataobject.division.MchDivisionReceiverGroupDO;
import com.hsjk.szwj.module.pay.dal.mysql.IMchDivisionReceiverGroupMapper;
import org.springframework.stereotype.Service;

/**
 * @author chenjiawei
 * @desc
 * @Date 2023/08/25 01:25
 **/
@Service
public class MchDivisionReceiverGroupService extends ServiceImpl<IMchDivisionReceiverGroupMapper, MchDivisionReceiverGroupDO> {

    /**
     * 根据ID和商户号查询
     **/
    public MchDivisionReceiverGroupDO findByIdAndMchNo(Long groupId, String mchNo) {
        return getOne(new LambdaQueryWrapper<MchDivisionReceiverGroupDO>()
                .eq(MchDivisionReceiverGroupDO::getId, groupId)
                .eq(MchDivisionReceiverGroupDO::getMchNo, mchNo));
    }
}
